package com.baggio.locationex.location;

import android.content.Context;

import com.baggio.locationex.MainActivityCallback;
import com.baggio.locationex.location.baidu.BaiduLocation;
import com.baggio.locationex.location.gaode.GaodeLocation;

public class BgLocation {

//    private BaiduLocation baiduLocation = null;
//    private GaodeLocation gaodeLocation = null;

    private BgLocationInterface locationInterface = null;

    public BgLocation(BgLocationType type, MainActivityCallback callback) {
        switch (type) {
            case LOCATION_TYPE_BAIDU:
                BaiduLocation baiduLocation = new BaiduLocation(callback);
                locationInterface = baiduLocation;
                break;
            case LOCATION_TYPE_GAODE:
                GaodeLocation gaodeLocation = new GaodeLocation(callback);
                locationInterface = gaodeLocation;
                break;
        }
    }

    /**
     * @param context
     * @return
     */
    public int Initialize(Context context) {
        return locationInterface.Initialize(context);
    }

    /**
     *
     */
    public void Start() {
        locationInterface.Start();
    }

    /**
     *
     */
    public void Stop() {
        locationInterface.Stop();
    }
}
